<template>
  <el-select v-model="timeType" placeholder="请选择">
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
      sortable/>
  </el-select>
</template>

<script>
import { timeIntervalTypeList } from '@/model/'
export default {
  name: 'UserList',
  props: {
    type: {
      type: String,
      default: 'day'
    }
  },
  data() {
    return {
      timeType: this.type,
      options: timeIntervalTypeList
    }
  },
  watch: {
    timeType() {
      this.$emit('input', this.timeType)
    }
  }
}
</script>

<style scoped>

</style>
